package day03;
import java.sql.SQLOutput;
import java.util.Scanner;
public class IfElseIfDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入金额：");
        double amount = scanner.nextDouble();
        if (amount<500){
            amount*=0.9;
        }else if ( amount<1000){
            amount*=0.8;
        }else if (amount<2000){
            amount*=0.7;
        }else {
            amount*=0.5;
        }
        System.out.println("最终价格："+amount);
    }
}
